﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PSL.ST
{
    /// <summary>
    /// Defines the type of the variable
    /// </summary>
    public enum VariableAccessType
    {
        None,
        Set,
        Get
    }

    internal class VariableNode : TreeNode
    {
        public VariableNode(TreeNode Parent)
            : base(Parent, TreeNodeType.DeclareFunction)
        {
            AccessType = VariableAccessType.None;
        }

        public string VariableName
        {
            get;
            set;
        }

        public VariableAccessType AccessType
        {
            get;
            set;
        }

        public override TreeNode CloneNode()
        {
            VariableNode returnNode = new VariableNode(null);

            returnNode.VariableName = this.VariableName;
            returnNode.AccessType = this.AccessType;

            return returnNode;
        }

        public override dynamic Execute(PSLEngine Engine)
        {
            return null;
        }
    }
}
